<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.prime.com.tr/ui" > 

<h:head></h:head> 
<body> 
<f:view>
	<h:form prependId="false">

		<p:panel id="panel" header="New Person" style="margin-bottom:10px;">
			<p:messages />
			<h:panelGrid columns="3">
				<h:outputLabel for="firstname" value="Firstname: *" />
				<p:inputText id="firstname" value="#{pprBean.firstName}" required="true" label="Firstname">
					<f:validateLength minimum="2" />
				</p:inputText>
				<p:message for="firstname" />
			
				<h:outputLabel for="surname" value="Surname: *" />
				<p:inputText id="surname" value="#{pprBean.surname}" required="true" label="Surname"/>
				<p:message for="surname" />
			</h:panelGrid>
		</p:panel>

		<p:commandButton value="Ajax Submit" update="panel,display" actionListener="#{pprBean.savePerson}" />
				
		<p:commandButton value="Non-Ajax Submit" actionListener="#{pprBean.savePerson}" ajax="false" />
	
		<p:commandButton value="With Icon" actionListener="#{pprBean.savePerson}" update="panel,display" image="ui-icon ui-icon-disk" />
	
		<p:commandButton actionListener="#{pprBean.savePerson}" update="panel,display" image="ui-icon ui-icon-disk" title="Icon Only"/>
	
		<p:commandButton value="Disabled" disabled="true" />
	
		<p:panel id="display" header="Information" style="margin-top:10px;">
			<h:panelGrid columns="2">
				<h:outputText value="Firstname: " />
				<h:outputText value="#{pprBean.firstName}" />
			
				<h:outputText value="Surname: " />
				<h:outputText value="#{pprBean.surname}" />
			</h:panelGrid>
		</p:panel>
	
	</h:form>
</f:view>

</body> 
</html>
